import router from '@system.router';
import prompt from '@system.prompt';

export default {
    data: {
        address: "深圳大学粤海校区紫薇斋菜鸟驿站",
        receiver: "杨子浩",
        phone: "2021190015",
        shop: "败家实验室",
        name: "败家实验室 流水风刃 三菱黑武士SXN1000 金属中油笔防疲劳中性笔",
        color: "金属银",
        price: 61.6,
        amount: 1,
        img: "common/images/detail/class2.jpg",
    },
    goBack() {
        router.back();
    },
    onInit() {
        this.parsePrice();
    },
    parsePrice() {
        this.yuan = Math.floor(this.price);
        this.fen = "" + (this.price - this.yuan);
        this.fen = this.fen.substr(1, 3);
    },
    go(path) {
        prompt.showToast({
            message: "选择收货地址功能暂未实现，请耐心等待更新版本（应跳转至" + path +"）",
            duration: 2000
        })
    }
}
